<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <!-- 根据路由文件里的meta属性来判断组件是否隐藏 -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header'
import Footer from '@/components/Footer'
export default {
  name: 'App',
  components: {
    Header,
    Footer
  },
  mounted() {
    // 通过vuex发送请求 获取数据 存储于仓库
    this.$store.dispatch('categoryList')
  }
}
</script>

<style>
</style>